package es.us.mwm.backBean;

import es.us.mwm.entities.Historyalerts;
import es.us.mwm.sessionBean.HistoryAlertsFacade;
import java.io.Serializable;
import java.util.Collection;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;

/**
 * Clase que almacena la alertas procesadas. Historico de alertas
 * @author y0rg
 */
@Named(value = "historyController")
@ViewScoped
public class HistoryAlertsController extends AbstractController<Historyalerts> implements Serializable {

    @Inject
    private HistoryAlertsFacade ejbFacade;

    private Collection<Historyalerts> items;

    /**
     * Constructor básico sin parametros
     */
    public HistoryAlertsController() {
        super(Historyalerts.class);
    }

    @Override
    public Collection<Historyalerts> getItems() {
        if (items == null) {
            items = this.ejbFacade.findAll();
        }
        return items;
    }

}
